package com.jack.thinking.thread.core._1;

public class InterruptBeforeWait {
	public static void main(String[] args) throws Exception {
		InterruptBeforeWaitThread tbs = new InterruptBeforeWaitThread();
		tbs.start();
		Thread.sleep(100L);
		tbs.interrupt();
		System.out.println("END");
	}
}

class InterruptBeforeWaitThread extends Thread{
	@Override
	public void run() {
		synchronized("hi") {
			try {
				System.out.println(Thread.interrupted());
				"hi".wait();
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			System.out.println(Thread.interrupted());
		}
	}
}
